from sqlalchemy import Column, Integer, Text
from sqlalchemy.ext.declarative import declarative_base
import uuid
from sqlalchemy.dialects.postgresql import UUID

Base = declarative_base()

class ApiCallStatistics(Base):
    __tablename__ = 'api_call_statistics'

    id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
    cur_year = Column(Integer)
    cur_month = Column(Integer)
    cur_date = Column(Text, nullable=False)
    total_translated_chars = Column(Integer, nullable=False)
    success_count = Column(Integer)
    failure_count = Column(Integer)